Skip to content

feat(edge-proxy): Wire the flagsmith-private edge_control_plane app into the api - #8305

Merged
gagantrivedi merged 2 commits into
mainfrom
feat/edge-proxy-app-wiring
Sep 16, 2026
Merged

gagantrivedi merged 2 commits into
mainfrom
feat/edge-proxy-app-wiring

Conversation

@gagantrivedi

@gagantrivedi gagantrivedi commented Aug 15, 2026

Copy link
Copy Markdown
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to Flagsmith/edge-proxy#128

Wires up the edge_control_plane private app (Flagsmith/flagsmith-private#265, renamed in #285, released in flagsmith-private 0.14.0, which main already locks via #8540). It provides the proxy key credential, the proxy config endpoint that lets a running Edge Proxy discover its environments, and the usage ingestion endpoint. Consumed by the proxy in Flagsmith/edge-proxy-rs#17, #18 and #19.

Three edits, following the rbac/scim pattern:

  • EDGE_CONTROL_PLANE_INSTALLED detection and conditional INSTALLED_APPS append.
  • Mounts for the two URL trees: proxy key management under organisations/{id}/edge-proxy/, and api/v1/proxy/ for the config and usage endpoints.
  • A mypy override so the no-private run passes.

Private cloud only: SaaS images ship the private wheel, so the mounts are gated on is_saas() at runtime rather than on the app being absent; the app's own views carry a matching permission as defence in depth.

How did you test this code?

With the 0.14.0 app installed: EDGE_CONTROL_PLANE_INSTALLED is True, edge_control_plane is in INSTALLED_APPS, and the three routes resolve (/api/v1/proxy/config/, /api/v1/proxy/usage/, /api/v1/organisations/1/edge-proxy/keys/). With a SAAS_DEPLOYMENT marker file present they 404. The app's own behaviour is covered by the integration tests in flagsmith-private.

@vercel

vercel Bot commented Aug 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
docs Ignored Ignored Preview Sep 16, 2026 10:23am UTC
flagsmith-frontend-preview Ignored Ignored Preview Sep 16, 2026 10:23am UTC
flagsmith-frontend-staging Ignored Ignored Preview Sep 16, 2026 10:23am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 3f189e48-95c6-4891-a522-4b2d3efa6a15

📥 Commits

Reviewing files that changed from the base of the PR and between 4330617 and 8732a97.

📒 Files selected for processing (4)
  • api/app/settings/common.py
  • api/app/urls.py
  • api/pyproject.toml
  • openapi.yaml

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change detects the optional edge_control_plane module and adds it to Django when available. It registers Edge Proxy routes when the module is installed and the runtime is not SaaS. It configures mypy for missing edge_control_plane imports. The OpenAPI specification adds Edge Proxy key CRUD endpoints, proxy configuration and usage endpoints, and related schemas.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to 8732a

The optional Edge Proxy integration and API definitions have no verified merge-blocking issue in the available code.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added api Issue related to the REST API feature New feature or request labels Aug 15, 2026
@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.81%. Comparing base (2b5fa4e) to head (8732a97).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8305   +/-   ##
=======================================
  Coverage   98.81%   98.81%           
=======================================
  Files        1620     1620           
  Lines       66185    66186    +1     
=======================================
+ Hits        65400    65401    +1     
  Misses        785      785           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gagantrivedi
gagantrivedi force-pushed the feat/edge-proxy-app-wiring branch from 42c4d60 to eb468cc Compare August 29, 2026 05:22
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 29, 2026
@gagantrivedi gagantrivedi changed the title feat: wire up the edge_proxy private app feat(edge-proxy): Wire the flagsmith-private edge_proxy app into the api Aug 29, 2026
@gagantrivedi
gagantrivedi marked this pull request as ready for review August 29, 2026 05:22
@gagantrivedi
gagantrivedi requested a review from a team as a code owner August 29, 2026 05:22
@gagantrivedi
gagantrivedi requested review from matthewelwell and removed request for a team August 29, 2026 05:22
@github-actions github-actions Bot removed the feature New feature or request label Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-8305 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-8305 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api-test:pr-8305 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-8305 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-8305 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-8305 Finished ✅ Results

@github-actions github-actions Bot added the feature New feature or request label Aug 29, 2026
@flagsmith-engineering
flagsmith-engineering Bot requested a review from a team as a code owner August 29, 2026 05:23
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor
✅ private-cloud · depot-ubuntu-latest-16 — run #20483 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  48.2 seconds
commit  2b4b6f4
info  🔄 Run: #20483 (attempt 1)

🗂️ Previous results
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20483 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  59.2 seconds
commit  2b4b6f4
info  🔄 Run: #20483 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20484 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.5 seconds
commit  8732a97
info  🔄 Run: #20484 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #20483 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.6 seconds
commit  2b4b6f4
info  🔄 Run: #20483 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20483 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  33.2 seconds
commit  2b4b6f4
info  🔄 Run: #20483 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #20484 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  3.5 seconds
commit  8732a97
info  🔄 Run: #20484 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #19945 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  48.8 seconds
commit  4330617
info  🔄 Run: #19945 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19945 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  38.7 seconds
commit  4330617
info  🔄 Run: #19945 (attempt 1)

✅ oss · depot-ubuntu-latest-arm-16 — run #19945 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  47.7 seconds
commit  4330617
info  🔄 Run: #19945 (attempt 1)

✅ oss · depot-ubuntu-latest-16 — run #19945 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  41.1 seconds
commit  4330617
info  🔄 Run: #19945 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19943 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  38.1 seconds
commit  eb468cc
info  🔄 Run: #19943 (attempt 1)

✅ private-cloud · depot-ubuntu-latest-16 — run #19943 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  31.9 seconds
commit  eb468cc
info  🔄 Run: #19943 (attempt 1)

@gagantrivedi
gagantrivedi force-pushed the feat/edge-proxy-app-wiring branch from 247cfc9 to 4330617 Compare August 29, 2026 05:28
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

Comment thread api/app/settings/common.py Outdated
Installs the app when the flagsmith-private wheel provides it, and mounts
its two URL trees outside SaaS: proxy key management under
organisations/{id}/edge-proxy/ and the proxy endpoints under api/v1/proxy/.
@gagantrivedi
gagantrivedi force-pushed the feat/edge-proxy-app-wiring branch from 4330617 to 2b4b6f4 Compare September 16, 2026 10:21
@gagantrivedi gagantrivedi changed the title feat(edge-proxy): Wire the flagsmith-private edge_proxy app into the api feat(edge-proxy): Wire the flagsmith-private edge_control_plane app into the api Sep 16, 2026
@github-actions github-actions Bot added feature New feature or request and removed feature New feature or request labels Sep 16, 2026
@gagantrivedi
gagantrivedi merged commit 5b54de7 into main Sep 16, 2026
38 of 42 checks passed
@gagantrivedi
gagantrivedi deleted the feat/edge-proxy-app-wiring branch September 16, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants